import { defineStore } from "pinia"

interface IUserInfoRes{
    username:string;
    roles:string[];
}

export const useUserInfoStore = defineStore("userinfo", {
    state: (): IUserInfoRes => {
      return {
        username: "",
        roles: [],
      };
    },
    actions: {
      updataUserInfo(username: string, roles: string[]) {
        this.username = username;
        this.roles = roles;
      },
    },
  });
